All Questions
21 questions
0votes
2answers
596views
Configuring SQLite3 for best efficiency as a persistent cache
I'm using SQLite3, via php's extension module, to create a persistent object cache for WordPress. It's intended for use on modestly sized sites that don't have access to redis or memcached. Why use ...
2votes
1answer
304views
PHP - using static variables to store "client" for later use
I had this S3Helper class before such that, every time I called a function to any of its methods (which I haven't shown here, but which do things like upload files to s3 or get temporary s3 links), it ...
1vote
1answer
75views
When slide show web page is reopen, the web page loading is very slow
Here is a script that opens about 200 pictures, the first time you open the webpage, loading of the 200 pictures is fast, However if you reopen the page, it takes about 4 minutes to load the same page ...
2votes
2answers
2kviews
Simple implementation of LRU caching in PHP
This is my implementation of LRU caching in PHP. It works fine when I tested as. What are the things that I miss or need attention? ...
1vote
1answer
223views
PHP Cache weather in a file
I'm using the darksky api to get weather data for a display board website. The free version is limited to 1000 api calls per month. I have a lot of devices (iPads) displaying this information in ...
3votes
1answer
99views
Validate iTunes links
I'm working on this code and I can't find a better way to improve this code, can anyone improve it more? My PHP is pretty bad, this is the best I could do. The code checks if iTunes link exists in ...
1vote
1answer
285views
htaccess with compression, caching, and rewrite rules for SEO
I have the following htaccess and I want it to be the perfect htaccess for my website so that it uses less bandwidth and meets the requirements of a good SEO. I am on an apache server and my files ...
2votes
1answer
330views
Cookie wrapper made for fun
This was mostly made for fun, so I don't see it having any real world purpose any time soon. ...
2votes
1answer
2kviews
Script that retrieves trending topics from Twitter
The following code fetches trending topics from Twitter's API using a WOEID. It caches the response, loading from this cache the next time if its relatively fresh (generated within the last 15 minutes)...
2votes
1answer
118views
Using Cache::remember for banners and stores
I'm using Cache::remember to cache 3 results in my action, 2 in the same call to Cache::remember. It works, but I have 2 ...
2votes
2answers
3kviews
Caching using phpFastCache
I have a class that holds functions for caching using PHPFastCache. There are quite a few static functions in here and for each one I am declaring: ...
3votes
1answer
960views
Caching in PHP using the filesystem
I wrote a simple class to cache data on a filesystem. The class also provides an internal cache using a static variable to avoid reading from disk for each request. ...
3votes
1answer
8kviews
Local image cache for external images
I have written a simple image cache script, the purpose is to load the image locally, so i can control the cache times of the images, and i have better load times than the host server, (battle.net ...
1vote
1answer
386views
Using Redis to store word occurences
I am doing a project where I am analyzing a group of Tweets. What I need to do is find the occurrence of each individual word. I am fairly new to Redis, so I am not quite sure that my solution is ...
5votes
1answer
446views
In-memory data cache architecture for data transfer
I am writing a cron job to manipulate and transfer remote data. I need to cache data from a table, process it, merge with previous table, iterate the process, and eventually send the result data to ...